<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">

<head th:include="css :: css">

</head>

<link href="/js/jquery.icheck/skins/square/blue.css" rel="stylesheet">
<link href="/css/bootstrap-toggle.min.css" rel="stylesheet">
<style>
    .block-flat .form-group {
        margin: 0 !important;
        padding: 0 !important;
    }
</style>
<body style="opacity: 1">
<div style="padding-top: 0">
    <div class="container-fluid">
        <div class="cl-mcont">
            <div class="row">
                <div class="col-md-12">
                    <div class="block-flat">
                        <form class="form-horizontal group-border-dashed" onsubmit="return false;" id="withdrawForm">
                            <div class="form-group">
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="会员编号/会员名称" name="userAccount"
                                           id="userAccount"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="申请订单号" name="orderId"
                                           id="orderId"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="流水号" name="flowNo"
                                           id="flowNo"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="认证姓名" name="certName"
                                           id="certificateName"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="提现金额" name="price"
                                           id="price"/>
                                </div>
                                <div class="input-group">
                                    <input type="text" class="form-control" placeholder="备注" name="remark"
                                           id="remark"/>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="withdrawChannel" name="withdrawChannel">
                                        <option selected="selected" value="">提现渠道</option>
                                        <option value="alipay">支付宝</option>
                                        <option value="bank">银行卡</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="applytype" name="applytype">
                                        <option value="">提现类型</option>
                                        <option value="0">供卡卡余额提现</option>
                                        <option value="2">佣金提现</option>
                                    </select>
                                </div>

                                <div class="input-group">
                                    <input type="text" class="form-control" name="startTime"
                                           id="buyStartTime" style="display: inline-block; width: 145px;">
                                    <input type="text" class="form-control" name="endTime"
                                           id="buyEndTime" style="display: inline-block; width: 145px;">
                                </div>
                                <div class="input-group">
                                    <select class="form-control" id="state" name="state">
                                        <option value="">提现状态</option>
                                        <option value="0">待获取</option>
                                        <option value="1">处理中</option>
                                        <option value="2">成功</option>
                                        <option value="3">失败</option>
                                        <option value="4">异常</option>
                                        <option value="5">返销</option>
                                    </select>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-primary" type="button" id="search"><i
                                            class="fa fa-search"></i>查询
                                    </button>&nbsp;
                                </div>
                                <div class="input-group"  shiro:hasAnyRoles="caiwu">
                                    <button class="btn btn-success btn-operation" type="button" id="auditSuccess"
                                            onclick="updateAuditStatus(1)"><i
                                            class="fa fa-check-circle"></i>审核成功
                                    </button>
                                </div>
                                <div class="input-group" shiro:hasAnyRoles="caiwu">
                                    <button class="btn btn-info" type="button" id="auditFail"
                                            onclick="updateAuditStatus(2)"><i
                                            class="fa fa-times"></i>审核失败
                                    </button>
                                </div>
                                <div class="input-group" shiro:hasAnyRoles="caiwu">
                                    <button class="btn btn-warning" type="button" id="resetTransfer"><i
                                            class="fa fa-rmb"></i>再次转账
                                    </button>
                                </div>
                                <div class="input-group" shiro:hasAnyRoles="caiwu">
                                    <button class="btn btn-danger btn-operation" type="button" id="dealFail"><i
                                            class="fa fa-times"></i>处理失败
                                    </button>
                                </div>
                                <div class="input-group" shiro:hasAnyRoles="caiwu">
                                    <span id="stopPro">
                                            <input type="checkbox" data-onstyle="danger" data-offstyle="warning"
                                                   name="include" id="include"
                                                   data-on="自动审核" data-off="手动审核" checked data-toggle="toggle"
                                                   data-size="mini"/>
                                    </span>
                                </div>
                                <div class="input-group" id="stopAutoStatus" shiro:hasAnyRoles="caiwu">
                                    <span id="stopAutoAudit">
                                        <input type="checkbox" data-onstyle="danger" data-offstyle="warning"
                                               name="include2" id="include2"
                                               data-on="停止自动" data-off="启动自动" checked data-toggle="toggle"
                                               data-size="mini"/>
                                        </span>
                                </div>
                                <div class="input-group" id="export_Role">
                                    <button class="btn btn-default" type="button" id="export"><i
                                            class="fa fa-download"></i> 导出
                                    </button>
                                </div>
                                <div class="input-group">
                                    <button class="btn btn-danger" type="button"
                                            onclick="commonHiddenColumn('dataTable', 3)">隐
                                    </button>
                                </div>
                            </div>
                        </form>
                    </div>
                    <div class="block-flat">
                        <div class="content">
                            <div class="table-responsive">
                                <table class="table hover" id="dataTable">
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
    <div class="modal fade" id="updateStatusModal" tabindex="-1" role="dialog" aria-labelledby="updateStatusLabel">
        <div class="modal-dialog" role="document" style="width:800px;">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="updateStatusLabel">修改提现状态</h4>
                </div>
                <div class="modal-body" style="min-height:160px;">
                    <form class="form-horizontal" role="form" id="updateStatusForm">
                        <input type="hidden" id="targetStatus" name="status">
                        <input type="hidden" id="oldId" name="oldId">
                        <input type="hidden" id="oldStatus" name="oldStatus">
                        <div class="col-sm-6">
                            <div class="form-group">
                                <textarea type="text" class="form-control" id="comment" placeholder="请输入备注"
                                          name="comment"></textarea>
                            </div>
                        </div>
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-primary" id="updateStatusSubmit">确定</button>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="hideModal" tabindex="-1" role="dialog" aria-labelledby="hideLabel">
        <div class="modal-dialog" role="document" style="width:1100px;">
            <div class="modal-content" style="width: 440px;margin: auto;">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                            aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title" id="hideLabel">请选择隐藏列</h4>
                </div>
                <div class="modal-body">
                    <div id="chooseHide">

                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary" data-dismiss="modal">确定</button>
                </div>
            </div>
        </div>
    </div>

</div>

<div th:include="js :: js"></div>
<script type="text/javascript" th:attr="src=@{/js/jquery.form.js}"></script>
<script type="text/javascript" th:attr="src=@{/js/jquery.parser.js}"></script>
<script type="text/javascript" src="js/jquery.icheck/icheck.min.js"></script>
<script type="text/javascript"
        src="/js/pageJs/finance/withdrawList.js?deVersion=2018070156"></script>
<script>
    var orderStatus = GetQueryString("state");
    if (orderStatus !== null && orderStatus !== '') {
        $("#state").val(orderStatus);
        $("#search").click();
    }
</script>
</body>
</html>
